import { getLingyu } from '@/api/cosweb';

// 研究模块
const investigate = {
  state: {

    industryData: [] // 行业领域数据
  },
  getters: {},
  mutations: {

    SET_INDUSTRY_DATA (state, data) {
      state.industryData = data;
    }
  },
  actions: {
    getIndustryData (context) {
      getLingyu({}).then((res) => {
        res = res.data;
        if (res.success) {
          const arr = res.data || [];
          // arr = arr.filter((item) => item.industryName !== '期货');
          context.commit('SET_INDUSTRY_DATA', arr);
        }
      });
    }
  }
};

export default investigate;
